package com.project.service.impl;

import com.project.bean.ClassBean;
import com.project.mapper.IClassMapper;
import com.project.service.IClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author(王思翰)
 * @Description(类的描述)
 * @Date(创建时间) 2021/7/13 16:49
 */
@Service
@Transactional
public class ClassServiceImpl implements IClassService {
    @Autowired
    private IClassMapper mapper;


    @Override
    public List<ClassBean> findByItem(String cityName, String SchoolName) {
       return mapper.findByItem(cityName,SchoolName);
    }

    @Override
    public List<ClassBean> findBySchool(int id) {
        return mapper.findBySchoolId(id);
    }

    @Override
    public void addClass(ClassBean classBean) {
        mapper.addClass(classBean);
    }

    @Override
    public void updateClass(int classId, String newTeacherName) {
        mapper.updateClass(classId,newTeacherName);
    }
}
